package com.wbcs.system.component.application.report.configbean.editablereport;

import com.wbcs.config.component.application.report.ColBean;
import com.wbcs.util.Consts;

public class EditableReportDeleteDataBean extends AbsEditableReportEditDataBean
{
    private String deleteConfirmMessage=null;

    public EditableReportDeleteDataBean(IEditableReportEditGroupOwnerBean owner)
    {
        super(owner);
    }

    public String getDeleteConfirmMessage()
    {
        return deleteConfirmMessage;
    }

    public void setDeleteConfirmMessage(String deleteConfirmMessage)
    {
        this.deleteConfirmMessage=deleteConfirmMessage;
    }

    @Override
	protected void setParamBeanInfoOfColBean(ColBean cbUpdateSrc,EditableReportParamBean paramBean,String configColProperty,String reportTypeKey)
    {
        if(Consts.COL_DISPLAYTYPE_HIDDEN.equals(cbUpdateSrc.getDisplaytype()))
        {
            if(configColProperty.endsWith("__old")) configColProperty=configColProperty.substring(0,configColProperty.length()-"__old".length());
        }else if(configColProperty.endsWith("__old"))
        {
            EditableReportColBean ercbeanUpdated=(EditableReportColBean)cbUpdateSrc.getExtendConfigDataForReportType(reportTypeKey);
            if(ercbeanUpdated==null||ercbeanUpdated.getEditableWhenUpdate()<=0)
            {
                configColProperty=configColProperty.substring(0,configColProperty.length()-"__old".length());
            }
        }
        paramBean.setParamname(configColProperty);
    }
}
